# A simple makefile generator by KiSoft, 2010. mailto: kisoft@rambler.ru
# version: 0.3.12.5
%.o:	%.cc
	@echo Compiling $*	
	@rm -f $*.o
	$(CXX) $(CXXFLAGS) -I$(CURL_PATH)\include -I$(OPENCV_PATH)\include -c $*.cc

# Project Variables start
CXX=g++
LD=g++
LIB=ar

CXXFLAGS = -Wall -g
OBJECTS_P3 = main.o wacawsource.o objectdetector.o blobdetector.o robot_orientation.o approxDecomp.o celldecompastar.o rovio.o simpledrivecontroller.o plan.o
OBJECTS_TEST = test.o cannedsource.o objectdetector.o blobdetector.o robot_orientation.o approxDecomp.o celldecompastar.o voronoi.o astarheuristics.o livesource.o
OBJECTS_PERCEPTION_TEST = perception_test.o cannedsource.o objectdetector.o blobdetector.o robot_orientation.o
OBJECTS_COLORTOOL = colortool.o cannedsource.o
OBJECTS_PLANNING_TEST = celldecompastar.o
OBJECTS_EXECUTION_TEST = execution_test.o simpledrivecontroller.o

# Project Variables end

# Target: Debug

p3: $(OBJECTS_P3)
	@echo Building console executable p3...
	@$(CXX) -g -o p3 $(OBJECTS_P3) -lcurl -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_video

test: $(OBJECTS_TEST)
	@echo Building console executable test...
	@$(CXX) -g -o test $(OBJECTS_TEST) -lcurl -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_video

perception_test: $(OBJECTS_PERCEPTION_TEST)
	@echo Building console executable perception_test...
	@$(CXX) -g -o perception_test $(OBJECTS_PERCEPTION_TEST) -lcurl -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_video

colortool: $(OBJECTS_COLORTOOL)
	@echo Building console executable colortool...
	@$(CXX) -g -o colortool $(OBJECTS_COLORTOOL) -lcurl -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_video

planning_test: $(OBJECTS_PLANNING_TEST)
	@echo Building console executable planning_test...
	@$(CXX) -g -o planning_test $(OBJECTS_PLANNING_TEST) -lcurl -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_video

execution_test: $(OBJECTS_EXECUTION_TEST)
	@echo Building console executable execution_test...
	@$(CXX) -g -o execution_test $(OBJECTS_EXECUTION_TEST) -lcurl -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_video

clean: 
	@rm -f *.o migio-deriv



